{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "学号\t姓名\t\\年龄\n",
      "1001\t张三\t18\n",
      "1002\t王五\t19\n",
      "1003\t李四\t20\n"
     ]
    }
   ],
   "source": [
    "# 一个学生\n",
    "stu = [1001,'张三',18]\n",
    "# 多个学生\n",
    "stus = [ [1001,'张三',18],\n",
    "            [1002,'王五',19],\n",
    "            [1003,'李四',20]]\n",
    "\n",
    "# 打印打印显示所有学生\n",
    "print(\"学号\\t姓名\\t年龄\")\n",
    "for s in stus:\n",
    "    print(\"{}\\t{}\\t{}\".format(s[0],s[1],s[2]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "170\n",
      "190\n"
     ]
    }
   ],
   "source": [
    "stus = [[1001,'张三',80,90],[1002,'李四',90,100]]\n",
    "print(stus[0][2]+stus[0][3])\n",
    "print(stus[1][2]+stus[1][3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
